/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.given.designpatterns.creational.abstractfactorypattern.factory.Impl;

import za.ac.cput.given.designpatterns.creational.abstractfactorypattern.Animal;
import za.ac.cput.given.designpatterns.creational.abstractfactorypattern.Impl.Cat;
import za.ac.cput.given.designpatterns.creational.abstractfactorypattern.Impl.Dog;

/**
 *
 * @author staff
 */
public class MammalFactory extends SpeciesFactory{
@Override
public Animal getAnimal(String type){
    if("dog".equals(type)){
return new Dog();
} else{
return new Cat();
}
}
    
}
